package com.zyinhao.service.impl;

import com.github.pagehelper.PageHelper;
import com.zyinhao.dao.ProductMapper;
import com.zyinhao.entity.Product;
import com.zyinhao.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by 27529 on 2018/10/15.
 */
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductMapper productMapper;//这里会报错，但是并不会影响

    @Override
    public List<Product> find(Map<String, Object> params) {
        PageHelper.startPage(1, 10);
        return productMapper.selectAll();
    }

    @Override
    public void save(Product product) {
        productMapper.insertSelective(product);
        return ;
    }

    @Override
    public void update(Product product) {

    }

    @Override
    public void delete(String ids) {

    }
}
